﻿using Opc.Ua;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using static FPSO.Models.Constant.TankConstant;

namespace FPSO.Models.Constant
{
	public class OPCTag
	{
        public OPCTag()
        {
			DispName = string.Empty;
			OpcName = string.Empty;
            OpcType = string.Empty;
            OpcValue = null;
        }

		/// <summary>
		/// DispName
		/// </summary>
		public string DispName { get; set; }

		/// <summary>
		/// OpcName
		/// </summary>
		public string OpcName { get; set; }
        /// <summary>
        /// OpcType
        /// </summary>
        public string OpcType { get; set; }
        /// <summary>
        /// Opc值
        /// </summary>
        public DataValue OpcValue { get; set; }
    }
	public class OpcTask
    {
        public string TaskName { get; set; }
        public List<OPCTag> TagList { get; set; }
    }

	//OpcTaskStatus记录opctask的状态，如果status=true，则认为该任务在执行
	public class OpcTaskStatus
	{
		public bool TaskStatus { get; set; }
		public OpcTask OpcTask { get; set; }
	}

	//DeviceStatus记录设备地址和对应设备应实现的状态
	public class DeviceStatus
	{
		public string DeviceStatusAdd { get; set; }
		public DEVICE_OPERATE DeviceStatusValue { get; set; }
	}

	public class TankOperTask
	{
		public string TaskName { get; set; }
		//CloseDeviceList
		public List<DeviceStatus> CloseDeviceList { get; set; }
		//OpenDeviceList
		public List<DeviceStatus> OpenDeviceList { get; set; }
	}
}
